﻿<?xml version="1.0" encoding="utf-8"?>
<AdoNetDataAccess connection="$ArticleDBConnection$" formatter="bizobj of eComProduct">
	<Sql>
		SELECT  p.id, p.supplierId, p.partId, p.supplierPartId
		<code>
		<![CDATA[
			if(details > DetailLevel.idOnly)
				sql.Append(", p.listPrice, p.sellPrice, p.avgCostPrice, p.weight, p.weightUnit, p.length, p.lengthUnit, p.depth, p.depthUnit, p.pricingId, p.width,p.widthUnit");
		]]>
		</code>
		, w.availableQty, w.onShelfQty
		FROM eComProducts AS p INNER JOIN
			eComWarehouseItems AS w ON p.id = w.productId INNER JOIN
			articles a ON p.id = a.id 
		WHERE p.id=@id
	</Sql>
	<Param name="id" type="UniqueIdentifier"/>
</AdoNetDataAccess>
